from .base import ContentExtractor, FileReadError


class MarkdownExtractor(ContentExtractor):
    """Markdown文件提取器"""

    def extract(self, file_path: str) -> str:
        try:
            with open(file_path, 'r', encoding='utf-8') as f:
                return f.read()
        except Exception as e:
            raise FileReadError(file_path, str(e))